package zhudongmai;

/**
 * Created with IntelliJ IDEA.
 * ClassName: Test
 * Package: zhudongmai
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-11-27
 * Time: 21:36
 */

public class Test {
    public static void main(String[] args) {

        System.out.println(getValue(2));

    }

    public static int getValue(int i) {
        int res = 0;
        switch (i) {
            case 1:
                res = res + i;
            case 2:
                res = res + i * 2;
            case 3:
                res = res + i * 3;

        }

        return res;
    }
}
